package com.whcoding.test.constant;

import com.whcoding.test.common.DateTimeUtils;

import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @program: spring-boot-learning
 * @description:
 * @author: whcoding
 * @create: 2022-02-15 11:38
 **/
public final class BaseConstant {

	/**
	 *  需要定义成final且定义一个private的构造方法, 这样做是为了不让其他类继承, 禁止实例化此类,
	 */
	private BaseConstant(){}


	//默认值
	public static final Integer DEFAULT_NEGETIVE_ONE = -1;
	public static final Integer DEFAULT_VALID_ZERO = 0;
	public static final Integer DEFAULT_VALID_ONE = 1;
	public static final Integer DEFAULT_VALID_TWO= 2;
	public static final Integer MAP_INITIAL_CAPACITY = 16;
	/**
	 * 空时间
	 */
	public static final String DEFAULT_DATE_VALUE_STR = "1900-01-01";
	public static final String DEFAULT_STRING_VALUE = "";

	public static final Long DEFAULT_LONG_VALUE = -1L;
	public static final BigDecimal DEFAULT_BIGDECIMAL_VALUE = BigDecimal.ZERO;


	/** yyyy-MM-dd */
	public static final String DATE_FORMAT = "yyyy-MM-dd";

	/** yyyy-MM-dd hh:mm:ss */
	public static final String DATETIME_FORMAT= "yyyy-MM-dd HH:mm:ss";

	public static final Float DEFAULT_FLOAT_VALUE = Float.valueOf(0);
	public static final Double DEFAULT_DOUBLE_VALUE = Double.valueOf(0);
	public static final Date DEFAULT_DATE = DateTimeUtils.parseDateByString("1900-01-01 00:00:00");
	public static final Instant DEFAULT_INSTANT_VALUE = Instant.MIN;
	public static final LocalDate DEFAULT_LOCALDATE_VALUE = LocalDate.MIN;
	public static final LocalDateTime DEFAULT_LOCALDATETIME_VALUE = LocalDateTime.MIN;
	public static final char SEPARATOR = '_';
	/**
	 * 默认每页的数据
	 */
	public static final Integer DEFAULT_PAGE_SIZE = 20;

}
